<template>
	<view class="bg">
		<view class="list" v-for="item in listData" :key="item.notice_id" @click="go(item.notice_id)">
			<view class="list_top">
				<text class="title">{{item.title}}</text>
				<text class="time">{{item.create_time}}</text>
			</view>
			<view class="list_cen">
				{{item.content}}
			</view>
			<view class="list_bot">
				查看详情>>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		noticeList
	} from '@/api/url.js'
	export default {
		data() {
			return {
				listData: {},
				form: {
					page: 1
				},
			}
		},
		onLoad() {
			var that = this
			var token = uni.getStorageSync('token')
			noticeList(that.form,token).then(res => {
				console.log(res)
				that.listData = res.data.data
			}).catch(err => {
				console.log(err)
			})
		},
		methods: {
			go(e) {
				console.log(e)
				uni.navigateTo({
					url: '/pages/person/details?id=' + e
				})
			},
			click() {},
			home() {
				uni.navigateTo({
					url: '/pages/index/index'
				})
			},
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #20243C;
	}

	.bg {
		width: 100%;

		.list {
			background-color: #30324C;
			padding: 51rpx 36rpx;
			box-sizing: border-box;
			margin-bottom: 24rpx;

			.list_top {
				display: flex;
				justify-content: space-between;
				align-items: center;

				.title {
					color: #F5C7A6;
					font-size: 36rpx;
				}

				.time {
					color: #858BA3;
					font-size: 26rpx;
				}
			}

			.list_cen {
				color: #fff;
				font-size: 30rpx;
				margin: 58rpx 0 37rpx 0;
			}

			.list_bot {
				color: #858BA3;
				font-size: 26rpx;
			}
		}
	}
</style>